package com.example.msi.loginproject605xh;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

/**
 * Created by M S I on 2017/5/29.
 */

public class Denglu extends AppCompatActivity implements View.OnClickListener{
    private Button button;
    private Button button2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        button=(Button)findViewById(R.id.button);
        button2=(Button)findViewById(R.id.button2);
        button.setOnClickListener(this);
        button2.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.button:
                Intent intent1=new Intent();
                intent1.setClass(Denglu.this,MainActivity.class);
                startActivity(intent1);
                break;
            case R.id.button2:
                Intent intent2=new Intent();
                intent2.setClass(Denglu.this,Zhuce.class);
                startActivity(intent2);
                break;
        }
    }
}
